#pragma once

#include <vector>
#include <unknwn.h>
#include <loki/HierarchyGenerators.h>
#include <loki/TypeList.h>
#include <loki/TypeListMacros.h>

class LokiFakeUnknown : public IUnknown
{
public:
	LokiFakeUnknown();
	virtual ~LokiFakeUnknown();

    /*** IUnknown methods ***/
    STDMETHOD(QueryInterface)(REFIID riid, void** ppvObj);
	typedef Loki::Tuple<LOKI_TYPELIST_2(IID, void **)> QueryInterfaceInputs;
	typedef Loki::Tuple<LOKI_TYPELIST_2(void *, HRESULT)> QueryInterfaceOutputs;
	std::vector<QueryInterfaceInputs> _queryInterfaceInputs;
	std::vector<QueryInterfaceOutputs> _queryInterfaceOutputs;

	STDMETHOD_(ULONG,AddRef)();
	typedef void AddRefInputs;
	typedef Loki::Tuple<LOKI_TYPELIST_1(ULONG)> AddRefOutputs;
	std::vector<AddRefOutputs> _addRefOutputs;

    STDMETHOD_(ULONG,Release)();
	typedef void ReleaseInputs;
	typedef Loki::Tuple<LOKI_TYPELIST_1(ULONG)> ReleaseOutputs;
	std::vector<ReleaseOutputs> _releaseOutputs;

private:
	int _queryInterfaceOutputCounter;
	int _addRefOutputCounter;
	int _releaseOutputCounter;
};
